/*-+-*****************************************************************************
 Copyright (C) 2009-2012 Oceanside Software Corporation (R)
 Dallas, Texas

 Author       : Jason T. Brower
 Purpose      : This file is part of a point-of-sale software package
                originally written for Table-Service Restaurants.
              
 Date         : July 8th of 2012
              
 History      : The application that this software file belongs to was 
                written over a 3-Year period.  The first version was written
                in C# .Net 3.5 using Windows Forms.  Being new to .Net at
                the time, I soon learned of Windows Presentation Foundation,
                liked the graphics capabilities and databinding so I
                migrated to WPF.  When the .Net 4.0 framework was released
                the application was migrated from 3.5 to 4.0. Now today,
                .Net 4.5 RC is out and I was already in process of migrating
                before I made this public.
                
Excuse Me     : Please excuse the coding style, it is not representative of
                my typical work.  During the three years I was under a very
                tight budget, constantly running out of funding and was 
                working 18 hour days hyped up on 5-Hour Energy.  The 
                design is not textbook.  It is monolythic because of
                previous issues I will not get into.  There are few comments
                in the code and the ones that are there may be incorrect.
                
What it is not: This is not the exact version that I took through PA-DSS 2.0
                nor is it the exact version running at my customer sites.
                I removed some details for security purposes including some
                encryption algorithms.  The reporting was removed because
                I was including a third party library that cannot be 
                published with this Open Source.
                
What it is    : This application has been running at high volume restaraunts
                for over a year.  It never freezes, crashes or does anything
                unexpected.  So long as it is built, installed and configured
                correctly, it is a strong system that we can all enhance.

Contact       : Please note that I can no longer work for free.  However, you
                can reach me at information@oceansidesw.com.                                                      

*********************************************************************************/
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System;
using System.Windows;
using System.Windows.Media;
namespace Oceanside
{
    public class OrderApi
    {
        public static bool ShowGridMessage
        {
            get;
            set;
        }
        public static FlatButton_52_58 SeatPosition1
        {
            get
            {
                if (Constants.IsQuickServiceMode)
                {
                    return QuickOrderWindow.SeatPosition1;
                }
                else
                {
                    return OrderWindow.SeatPosition1;
                }
            }
        }

        public static Border OrderBorder
        {
            get
            {
                if (Constants.IsQuickServiceMode)
                {
                    return QuickOrderWindow.OrderBorder;
                }
                else
                {
                    return OrderWindow.OrderBorder;
                }
            }
        }

        public static FlatButton_52_58 SeatPosition2
        {
            get
            {
                if (Constants.IsQuickServiceMode)
                {
                    return QuickOrderWindow.SeatPosition2;
                }
                else
                {
                    return OrderWindow.SeatPosition2;
                }
            }
        }
        public static FlatButton_52_58 SeatPosition3
        {
            get
            {
                if (Constants.IsQuickServiceMode)
                {
                    return QuickOrderWindow.SeatPosition3;
                }
                else
                {
                    return OrderWindow.SeatPosition3;
                }
            }
        }

        public static FlatButton_52_58 SeatPosition4
        {
            get
            {
                if (Constants.IsQuickServiceMode)
                {
                    return QuickOrderWindow.SeatPosition4;
                }
                else
                {
                    return OrderWindow.SeatPosition4;
                }
            }
        }

        public static ShineButton_52_58 ScrollSeatLeft
        {
            get
            {
                if (Constants.IsQuickServiceMode)
                {
                    return QuickOrderWindow.ScrollSeatLeft;
                }
                else
                {
                    return OrderWindow.ScrollSeatLeft;
                }
            }
        }

        public static ShineButton_52_58 ScrollSeatRight
        {
            get
            {
                if (Constants.IsQuickServiceMode)
                {
                    return QuickOrderWindow.ScrollSeatRight;
                }
                else
                {
                    return OrderWindow.ScrollSeatRight;
                }
            }
        }

        public static ShineButton_155_58 ScrollMainMenuUPButton
        {
            get
            {
                if (Constants.IsQuickServiceMode)
                {
                    return QuickOrderWindow.ScrollMainMenuUPButton;
                }
                else
                {
                    return OrderWindow.ScrollMainMenuUPButton;
                }
            }
        }

        public static ShineButton_155_58 ScrollMainMenuDownButton
        {
            get
            {
                if (Constants.IsQuickServiceMode)
                {
                    return QuickOrderWindow.ScrollMainMenuDownButton;
                }
                else
                {
                    return OrderWindow.ScrollMainMenuDownButton;
                }
            }
        }
        public static TextBlock TbModifyMessage
        {
            get
            {
                if (Constants.IsQuickServiceMode)
                {
                    return QuickOrderWindow.TbModifyMessage;
                }
                else
                {
                    return OrderWindow.TbModifyMessage;
                }
            }
        }
        public static Grid GridModifyMessage
        {
            get
            {
                if (Constants.IsQuickServiceMode)
                {
                    return QuickOrderWindow.GridModifyMessage;
                }
                else
                {
                    return OrderWindow.GridModifyMessage;
                }
            }
        }
        public static ShineButton_155_58 ScollSubMenuUpButton
        {
            get
            {
                if (Constants.IsQuickServiceMode)
                {
                    return QuickOrderWindow.ScollSubMenuUpButton;
                }
                else
                {
                    return OrderWindow.ScollSubMenuUpButton;
                }
            }
        }
        public static ShineButton_155_58 ScollSubMenuDownButton
        {
            get
            {
                if (Constants.IsQuickServiceMode)
                {
                    return QuickOrderWindow.ScollSubMenuDownButton;
                }
                else
                {
                    return OrderWindow.ScollSubMenuDownButton;
                }
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public static WrapPanel PanelTopFunctions
        {
            get
            {
                if (Constants.IsQuickServiceMode)
                {
                    return QuickOrderWindow.PanelTopFunctions;
                }
                else
                {
                    return OrderWindow.PanelTopFunctions;
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public static WrapPanel PanelBottomFunctions
        {
            get
            {
                if (Constants.IsQuickServiceMode)
                {
                    return QuickOrderWindow.PanelBottomFunctions;
                }
                else
                {
                    return OrderWindow.PanelBottomFunctions;
                }
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public static WrapPanel PanelAuxFunctions
        {
            get
            {
                if (Constants.IsQuickServiceMode)
                {
                    return QuickOrderWindow.PanelAuxFunctions;
                }
                else
                {
                    return OrderWindow.PanelAuxFunctions;
                }
            }
        }

        public static StackPanel MainMenuStack
        {
            get
            {
                if (Constants.IsQuickServiceMode)
                {
                    return QuickOrderWindow.MainMenuStack;
                }
                else
                {
                    return OrderWindow.MainMenuStack;
                }
            }
        }

        public static WrapPanel SubMenuWrap
        {
            get
            {
                if (Constants.IsQuickServiceMode)
                {
                    return QuickOrderWindow.SubMenuWrap;
                }
                else
                {
                    return OrderWindow.SubMenuWrap;
                }
            }
        }

        public static Button_95_50 CloseTableButton
        {
            get
            {
                if (Constants.IsQuickServiceMode)
                {
                    return QuickOrderWindow.CloseTableButton;
                }
                else
                {
                    return OrderWindow.CloseTableButton;
                }
            }
        }

        public static Label TableNumberLabel
        {
            get
            {
                if (Constants.IsQuickServiceMode)
                {
                    return QuickOrderWindow.TableNumberLabel;
                }
                else
                {
                    return OrderWindow.TableNumberLabel;
                }
            }
        }

        public static ListView CustomerTicketListView
        {
            get
            {
                if (Constants.IsQuickServiceMode)
                {
                    return QuickOrderWindow.CustomerTicketListView;
                }
                else
                {
                    return OrderWindow.CustomerTicketListView;
                }
            }
        }

        public static ListView CustomerCheckListView
        {
            get
            {
                if (Constants.IsQuickServiceMode)
                {
                    return QuickOrderWindow.CustomerCheckTotal;
                }
                else
                {
                    return null;
                }
            }
        }
        public static BindInterface ExcptnModButtonBinding
        {
            get
            {
                if (Constants.IsQuickServiceMode)
                {
                    return QuickOrderWindow.ExcptnModButtonBinding;
                }
                else
                {
                    return OrderWindow.ExcptnModButtonBinding;
                }
            }

            set
            {
                if (Constants.IsQuickServiceMode)
                {
                    QuickOrderWindow.ExcptnModButtonBinding = value;
                }
                else
                {
                    OrderWindow.ExcptnModButtonBinding = value;
                }
            }
        }


        /// <summary>
        /// 
        /// </summary>
        /// <param name="o"></param>
        public static void AssignDataContext(object o)
        {
            if (Constants.IsQuickServiceMode)
            {
                QuickOrderWindow.AssignDataContext(o);
            }
            else
            {
                OrderWindow.AssignDataContext(o);
            }
        }

        public static void Show()
        {
            if (Constants.IsQuickServiceMode)
            {
                QuickOrderWindow.Show();
            }
            else
            {
                OrderWindow.Show();
            }
        }
    }
}
